<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
    <script>
        window.onload=function(){
            new Vue({
                el:'#app',
                data:{},
                methods:{},
                components:{
                    "my-header":{
                        data(){
                            return{
                                num:10
                            }
                        },
                        methods:{
                            handler(){
                                this.num++;
                            }
                        },
                        template:`
                            <div>
                                <h1>header-{{num}}</h1>
                                <p>hello-contains</p>
                                <button @click='handler'>click</button>
                            </div>
                        `
                    },
                    
                }
            })
        }
    </script>
</head>
<body>
    <div id="app">
        <my-header></my-header>
    </div>
</body>
</html>